include(RunCMake)

run_cmake(EmptyString)
run_cmake(EmptyStringOptional)
run_cmake(CMP0024-NEW)
run_cmake(ExportExportInclude)
run_cmake(IncludeIsDirectory)
run_cmake(IncludeMalformed)
run_cmake(ParentVariableRoot)
run_cmake(ParentVariableSubDir)
run_cmake_script(ParentVariableScript)

run_cmake(CMP0146-OLD)
run_cmake(CMP0146-WARN)
run_cmake(CMP0146-NEW-name)
run_cmake(CMP0146-NEW-path)

run_cmake(CMP0148-Interp-OLD)
run_cmake(CMP0148-Interp-WARN)
run_cmake(CMP0148-Interp-NEW-name)
run_cmake(CMP0148-Interp-NEW-path)
run_cmake(CMP0148-Libs-OLD)
run_cmake(CMP0148-Libs-WARN)
run_cmake(CMP0148-Libs-NEW-name)
run_cmake(CMP0148-Libs-NEW-path)

run_cmake(CMP0167-OLD)
run_cmake(CMP0167-WARN)
run_cmake(CMP0167-NEW-name)
run_cmake(CMP0167-NEW-path)

run_cmake(CMP0188-OLD)
run_cmake(CMP0188-WARN)
run_cmake(CMP0188-NEW-name)
run_cmake(CMP0188-NEW-path)

run_cmake(CMP0191-OLD)
run_cmake(CMP0191-WARN)
run_cmake(CMP0191-NEW-name)
run_cmake(CMP0191-NEW-path)

run_cmake(CMP0196-OLD)
run_cmake(CMP0196-WARN)
run_cmake(CMP0196-NEW-name)
run_cmake(CMP0196-NEW-path)

# Warn should silently behave like OLD
# Test old with implicit and explicit policy setting
run_cmake(CMP0198-OLD-root)
run_cmake(CMP0198-WARN-root)
set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0198=OLD")
run_cmake(CMP0198-OLD-root)
set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0198=NEW")
run_cmake(CMP0198-NEW-root)
unset(RunCMake_TEST_OPTIONS)
run_cmake(CMP0198-implicit-NEW-root)
run_cmake(CMP0198-OLD-subdir)
run_cmake(CMP0198-WARN-subdir)
set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0198=OLD")
run_cmake(CMP0198-OLD-subdir)
set(RunCMake_TEST_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0198=NEW")
run_cmake(CMP0198-NEW-subdir)
unset(RunCMake_TEST_OPTIONS)
